package com.salt.common;

/**
 * @author HaiBo Kuang
 * @version 0.0.1 2021/3/30
 * @since 0.0.1
 */
public class BusinessException extends RuntimeException {
    private ResponseStatus status;
    private String errorMessage;

    public BusinessException(ResponseStatus status) {
        super(status.getDescription());
        this.status = status;
        this.errorMessage = status.getDescription();
    }

    public ResponseStatus getStatus() {
        return status;
    }

    public void setStatus(ResponseStatus status) {
        this.status = status;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }
}
